/*
 * @Author: xuhong
 * @Date: 2020-04-30 19:06:28
 * @LastEditTime: 2020-04-30 20:50:29
 * @FilePath: \my-admin\src\store\modules\user.js
 */



const user = {
    state:{
        user:'',
        userId:''
    },
    getters: {
        user: state => state.user,
        userId: state => state.userId,
    },
    mutations: {
        SET_USER: (state,user) => {
            state.user = user
        },
        SET_USERID: (state,userId) => {
            state.userId = userId
        }
    },
    actions: {
        setUserID({commit},userId){
            commit('SET_USERID',userId)
        }
    }
}

export default user